package com.uglive.cg.device.qrAndBar;

import android.content.Context;

import com.yuwei.utils.Card;

// 手持机DH8600
public class DH8600ScanQrAndBar implements IScanQrAndBar {


    @Override
    public boolean open() {
        Card.init(115200);
        return true;
    }

    @Override
    public boolean close() {
        Card.exit();
        return true;
    }

    @Override
    public String scan() {
        String bytes = Card.oneDimensionalCode();
        if (bytes != null) {
            Card.rf_beep(50);
        }
        return bytes;
    }
}
